<template>
	<!-- 直联核保消息处理工作列表-预核保详情页面 -->
	<div class="fillcontain bgfff">
		<div class="contain baseInfo">
			<el-form label-width="120px">
				<el-row class="mt20">
					<el-col :span="6">
						<el-form-item label="流水号">
							<el-input disabled v-model="this.seqNumber" ></el-input>
						</el-form-item>
					</el-col>
					<el-col :span="6">
						<el-form-item label="电子流水号">
							<el-input disabled v-model="this.docno" ></el-input>
						</el-form-item>
					</el-col>
				</el-row>
			</el-form>
		</div>

		<!-- 被保险人 -->
		<div class="contain baseInfo">
			<div class="title"><span>被保险人</span></div>
			<el-form label-width="120px">
				<el-row class="mt20">
					<el-col :span="6">
						<el-form-item label="姓名">
							<el-input disabled v-model="insuredList.surname" ></el-input>
						</el-form-item>
					</el-col>
					<el-col :span="6">
						<el-form-item label="证件号码">
							<el-input disabled v-model="insuredList.secuityno" ></el-input>
						</el-form-item>
					</el-col>
					<el-col :span="6">
						<el-form-item label="证件类型">
							<el-input disabled v-model="insuredList.secuityTypeCHN" ></el-input>
						</el-form-item>
					</el-col>
					<el-col :span="6">
						<el-form-item label="职业">
							<el-input disabled v-model="insuredList.occupname" ></el-input>
						</el-form-item>
					</el-col>
				</el-row>
			</el-form>
		</div>

		<!-- 保险计划 -->
		<div class="contain baseInfo">
			<div class="title"><span>保险计划</span></div>
			<div class="table_container">
				<el-table :data="planList" show-summary style="width: 100%" :summary-method="getSummaries">
					<el-table-column prop="surname" label="被保险人"  min-width="120" show-overflow-tooltip>
					</el-table-column>
					<el-table-column prop="anbAtCcd" label="年龄" min-width="80" show-overflow-tooltip>
					</el-table-column>
					<el-table-column prop="cltsexCHN" label="性别" min-width="80" show-overflow-tooltip>
					</el-table-column>
					<el-table-column prop="mortcls" label="职级" min-width="100" show-overflow-tooltip>
					</el-table-column>
					<el-table-column prop="riskname" label="险种名称" min-width="120" show-overflow-tooltip>
					</el-table-column>
					<el-table-column prop="sumins" label="保额金额/份数" min-width="140" show-overflow-tooltip>
					</el-table-column>
					<el-table-column prop="riskCessTerm" label="保障期" min-width="120" show-overflow-tooltip>
					</el-table-column>
					<el-table-column prop="premCessTerm" label="缴费期" min-width="120" show-overflow-tooltip>
					</el-table-column>
					<el-table-column prop="instprem" label="标准保费" min-width="100" show-overflow-tooltip>
					</el-table-column>
					<el-table-column prop="actprem" label="缴费金额" min-width="100" show-overflow-tooltip>
					</el-table-column>
					<el-table-column prop="topamnt" label="最高保额" min-width="100" show-overflow-tooltip>
					</el-table-column>
					<!-- <el-table-column prop="udrtext" label="险种核保结论" min-width="120" show-overflow-tooltip>
						<template slot-scope="scope">
							<el-select v-if="routeStatus == 'C'" v-model="scope.row.udrtext" placeholder="" size="mini" clearable :disabled="changeDis">
								<el-option label="标准体" value="S"></el-option>
								<el-option label="加费" value="A"></el-option>
								<el-option label="除外" value="C"></el-option>
								<el-option label="加费除外" value="B"></el-option>
								<el-option label="延期" value="P"></el-option>
								<el-option label="拒保" value="D"></el-option>
								<el-option label="取消" value="W"></el-option>
							</el-select>
							<span v-else>{{ transformationFun("CrableConclusionInfo",scope.row.udrtext) || "--" }}</span>
						</template>
					</el-table-column> -->
				</el-table>
			</div>
		</div>

		<!-- 理赔史 -->
		<div class="contain baseInfo">
			<div class="title"><span>理赔史</span></div>
			<el-row>
				<el-col :span="24">
					<el-input :disabled="this.changeDis || this.messageDis || this.endDis" v-model="historyList[0].claimHistoryDesc" type="textarea" placeholder="请输入理赔史信息"></el-input>
				</el-col>
			</el-row>
		</div>

		<!-- 医务信息 -->
		<div class="contain">
			<div class="title"><span>医务信息</span></div>
			<el-tabs type="card" v-model="activeNameA">
				<el-tab-pane label="健康告知" name="first">
					<el-row>
						<el-col :span="24">
							<el-input type="textarea" :disabled="this.changeDis || this.messageDis || this.endDis" v-model="medicalList[0].medicaldesc" placeholder="请输入健康告知信息"></el-input>
						</el-col>
					</el-row>
				</el-tab-pane>
				<el-tab-pane label="既往体检报告" name="second">
					<el-row>
						<el-col :span="24">
							<el-input type="textarea" :disabled="this.changeDis || this.messageDis || this.endDis" v-model="medicalList[1].medicaldesc" placeholder="请输入既往体检报告信息"></el-input>
						</el-col>
					</el-row>
				</el-tab-pane>
				<el-tab-pane label="达标体检" name="third">
					<el-row>
						<el-col :span="24">
							<el-input type="textarea" :disabled="this.changeDis || this.messageDis || this.endDis" v-model="medicalList[2].medicaldesc" placeholder="请输入达标体检信息"></el-input>
						</el-col>
					</el-row>
				</el-tab-pane>
			</el-tabs>
		</div>

		<!-- 财务信息 -->
		<div class="contain">
			<div class="title"><span>财务信息</span></div>
			<el-tabs type="card" v-model="activeNameB">
				<el-tab-pane label="收入类" name="four">
					<el-row>
						<el-col :span="24">
							<el-input type="textarea" :disabled="this.changeDis || this.messageDis || this.endDis" v-model="financialList[0].findesc" placeholder="请输入收入类信息"></el-input>
						</el-col>
					</el-row>
				</el-tab-pane>
				<el-tab-pane label="资产类" name="five">
					<el-row>
						<el-col :span="24">
							<el-input type="textarea" :disabled="this.changeDis || this.messageDis || this.endDis" v-model="financialList[1].findesc" placeholder="请输入资产类信息"></el-input>
						</el-col>
					</el-row>
				</el-tab-pane>
				<el-tab-pane label="第三方平台、公众平台信息(正面)" name="six">
					<el-row>
						<el-col :span="24">
							<el-input type="textarea" :disabled="this.changeDis || this.messageDis || this.endDis" v-model="financialList[2].findesc" placeholder="请输入第三方平台、公众平台信息(正面)信息"></el-input>
						</el-col>
					</el-row>
				</el-tab-pane>
				<el-tab-pane label="第三方平台、公众平台信息(负面)" name="seven">
					<el-row>
						<el-col :span="24">
							<el-input type="textarea" :disabled="this.changeDis || this.messageDis || this.endDis" v-model="financialList[3].findesc" placeholder="请输入第三方平台、公众平台信息(负面)信息"></el-input>
						</el-col>
					</el-row>
				</el-tab-pane>
			</el-tabs>
		</div>

		<!-- 排查信息 -->
		<div class="contain">
			<div class="title"><span>排查信息</span></div>
			<el-tabs type="card" v-model="activeNameC">
				<el-tab-pane label="同业排查" name="eight">
					<el-row>
						<el-col :span="24">
							<el-input type="textarea" :disabled="this.changeDis || this.messageDis || this.endDis" v-model="checkInfoList[0].checkdesc" placeholder="请输入同业排查信息"></el-input>
						</el-col>
					</el-row>
				</el-tab-pane>
				<el-tab-pane label="医保排查" name="nine">
					<el-row>
						<el-col :span="24">
							<el-input type="textarea" :disabled="this.changeDis || this.messageDis || this.endDis" v-model="checkInfoList[1].checkdesc" placeholder="请输入医保排查信息"></el-input>
						</el-col>
					</el-row>
				</el-tab-pane>
				<el-tab-pane label="生存调查" name="ten">
					<el-row>
						<el-col :span="24">
							<el-input type="textarea" :disabled="this.changeDis || this.messageDis || this.endDis" v-model="checkInfoList[2].checkdesc" placeholder="请输入生存调查信息"></el-input>
						</el-col>
					</el-row>
				</el-tab-pane>
			</el-tabs>
		</div>
		<!-- 综合结论 -->
		<div class="contain">
			<div class="title"><span>初审综合意见</span></div>
			<el-tabs type="card" v-model="activeNameD">
				<el-tab-pane label="医务评估" name="eleven">
					<el-row>
						<el-col :span="24">
							<el-input type="textarea" :disabled="this.changeDis || this.messageDis || this.endDis" v-model="comprehensiveList[0].assessdesc" placeholder="请输入医务评估信息"></el-input>
						</el-col>
					</el-row>
				</el-tab-pane>
				<el-tab-pane label="财务评估" name="twelve">
					<el-row>
						<el-col :span="24">
							<el-input type="textarea" :disabled="this.changeDis || this.messageDis || this.endDis" v-model="comprehensiveList[1].assessdesc" placeholder="请输入财务评估信息"></el-input>
						</el-col>
					</el-row>
				</el-tab-pane>
				<el-tab-pane label="综合小结" name="thirteen">
					<el-row>
						<el-col :span="24">
							<el-input type="textarea" :disabled="this.changeDis || this.messageDis || this.endDis" v-model="comprehensiveList[2].assessdesc" placeholder="请输入综合小结"></el-input>
						</el-col>
					</el-row>
				</el-tab-pane>
			</el-tabs>
		</div>

		<!-- 影像列表 -->
		<div class="contain">
			<div class="title"><span>影像列表</span></div>
			<div class="table_container">
				<!-- <span class="operationIconC" @click="showImageList(seqNumber)">
                	<i class="el-icon-camera"></i>
              	</span> -->
				  <!-- @selection-change="handleSelectionChange"  -->
				<el-table ref="multipleTable" v-loading="loading" :data="imageDataList"
					 highlight-current-row header-cell-class-name="table-header-class" style="width:100%">
					<!-- <el-table-column fixed type="selection" width="55">
					</el-table-column> -->
					<!-- <el-table-column min-width="60" show-overflow-tooltip label="备注" align='center'>
						<template slot-scope="scope">
							<span class="operationIcon" @click="memoGo(scope.row.busiType, scope.row.itemid)">
								<i v-if="!scope.row.remark" class="el-icon-tickets"></i>
								<i v-if="scope.row.remark" class="el-icon-info"></i>
							</span>
						</template>
					</el-table-column>
					<el-table-column label="记录" width="60" show-overflow-tooltip align='center'>
						<template slot-scope="scope">
							<span class="operationIcon" @click="updateRecordGo(scope.row.busiType, scope.row.itemid)">
								<i class="el-icon-edit-outline"></i>
							</span>
						</template>
					</el-table-column>
					<el-table-column min-width="120" property="serno" label="流水号" align='center' show-overflow-tooltip>
					</el-table-column> -->
					<el-table-column min-width="220" property="docTyp" label="文件类型" align='center' show-overflow-tooltip>
					</el-table-column>
					<el-table-column min-width="100" property="scanDate" label="扫描日期" align='center' show-overflow-tooltip>
					</el-table-column>
					<el-table-column min-width="80" property="scanTime" label="扫描时间" align='center' show-overflow-tooltip>
					</el-table-column>
					<el-table-column width="80" label="是否列印" align='center'>
						<template slot-scope="scope">
							<span v-if="scope.row.isPrint == 0">N</span>
							<span v-if="scope.row.isPrint == 1">Y</span>
						</template>
					</el-table-column>
					<el-table-column min-width="150" property="stockID" label="存仓号码" align='center' show-overflow-tooltip>
					</el-table-column>
					<el-table-column min-width="120" property="groupNo" label="组号" align='center' show-overflow-tooltip>
					</el-table-column>
					<el-table-column width="100" label="是否新受理" align='center'>
						<template slot-scope="scope">
							<span v-if="scope.row.subbusitype == ''">&nbsp;&nbsp;&nbsp;&nbsp;</span>
							<span v-else>{{scope.row.subbusitype}}</span>
						</template>
					</el-table-column>
					<el-table-column min-width="120" label="最新备注" align='center' show-overflow-tooltip>
						<template slot-scope="scope">
                            <el-tooltip class="item" :content="scope.row.remark" placement="top">
                                <span>{{scope.row.remark || ''}}</span>
                            </el-tooltip>
                  		</template>
					</el-table-column>
					<el-table-column fixed="right" width="50" label="影像" min-width="60" show-overflow-tooltip align='center'>
						<template slot-scope="scope">
							<span class="operationIcon" @click="showImage_newObject(scope.row)">
								<i class="el-icon-camera"></i>
							</span>
						</template>
					</el-table-column>
					<el-table-column fixed="right" width="100" property="address" label="操作" align='center'>
						<template slot-scope="scope">
							<el-button type="text" size="small" @click="imagInfoGo(
                                    scope.row.busiType,
                                    scope.row.policyNo,
                                    scope.row.busiNo,
                                    scope.row.subbusitype,
                                    scope.row.productType,
                                    scope.row.docTyp,
                                    scope.row.stockID,
                                    scope.row.groupNo,
                                    scope.row.scanDate,
                                    scope.row.scanTime,
                                    scope.row.isPrint,
                                    scope.row.ishcprint,
                                    scope.row.version,
                                    scope.row.itemid,
                                    scope.row.agentNo,
                                    scope.row.updateflag,
                                    scope.row.company
                                )">影像信息
							</el-button>
						</template>
					</el-table-column>
				</el-table>
				<!-- 分页信息 -->
				<el-row>
					<el-col :span="24">
						<div class="pagination">
							<el-pagination background v-if='paginations.total > 0' :page-sizes="paginations.pageSizes" :page-size="paginations.pageSize"
											 :layout="paginations.layout" :total="paginations.total" :current-page='paginations.pageIndex'
											 @current-change='handleCurrentChange' @size-change='handleSizeChange'>
							</el-pagination>
						</div>
					</el-col>
				</el-row>
			</div>
		</div>

		<!-- 上传列表 -->
		<div class="contain">
			<div class="title"><span>上传列表</span></div>
			<div class="table_container">
				<el-table :data="imageList" style="width: 100%;">
					<el-table-column prop="recid" label="序号" min-width="20" show-overflow-tooltip>
					</el-table-column>
					<el-table-column prop="imagename" label="文件名称" min-width="200" show-overflow-tooltip>
					</el-table-column>
					<el-table-column prop="imagepath" v-if="false" label="文件原路径" min-width="120" show-overflow-tooltip>
					</el-table-column>
					<el-table-column prop="imagepath" v-if="false" label="文件原路径" min-width="120" show-overflow-tooltip>
						<!-- <template slot-scope="scope"> -->
							<img :src="img_src" />
						<!-- </template> -->
					</el-table-column>
					<!-- 下载功能 -->
					<!-- <el-table-column width="100" label="操作">
						<template slot-scope="scope">
							<span class="operationIcon" @click="download(scope.row)">
								<el-tooltip class="item" effect="light" content="下载" placement="top">
									<i class="el-icon-download"></i>
								</el-tooltip>
							</span>
						</template>
					</el-table-column> -->
				</el-table>
				<!-- <el-upload ref="upload" :action="actionUrl" :show-file-list="false" :on-success="onSuccess" :on-error="onError" :headers="myHeaders" accept=".tif" :before-upload="handleBeforeUpload" :disabled="!enabledUploadBtn"> -->
					<!-- :disabled="!enabledUploadBtn" -->
				<el-button size="normal" type="danger" style="margin-top: 10px;" :disabled="true" :icon="uploadBtnIcon" @click="uploadImgFlag = true" v-if="this.routeStatus == 'A' || this.routeStatus == 'W'"> 上传 </el-button>
				<!-- </el-upload> -->
			</div>
		</div>

		<!-- 消息作业 -->
		<div class="contain mt10">
			<div class="title" style="margin-bottom: 0px !important;">
				<span>消息作业</span>
			</div>
			<el-tabs type="card" v-model="activeNameD">
				<el-form label-width="120px">
					<el-row class="mt20">
						<!-- <el-col :span="6">
							<el-form-item label="消息类型">
								<el-select v-model="msginfoData.msgtypeCode" :disabled="true" filterable allow-create default-first-option
									placeholder="请选择" clearable>
									<el-option v-for="item in dataTypesNotify" :key="item.value" :label="item.label" :value="item.value">
									</el-option>
								</el-select>
							</el-form-item>
						</el-col> -->
						<el-col :span="24">
							<el-form-item label="消息描述">
								<el-input type="textarea" :disabled="true" v-model="msginfoData.msgdsc" placeholder="请输入描述"></el-input>
							</el-form-item>
						</el-col>
					</el-row>
				</el-form>
				<!-- <el-row>
					<el-col :span="6" style="margin-right: 10px;">
						<span>消息类型</span>
						<el-select v-model="msginfoData.msgtypeCode" filterable allow-create default-first-option
							placeholder="请选择" clearable>
							<el-option v-for="item in dataTypesNotify" :key="item.value" :label="item.label" :value="item.value">
							</el-option>
						</el-select>
					</el-col>
					<el-col :span="18">
						<span>消息描述</span>
						<el-input type="textarea" :disabled="this.changeDis || this.messageDis" v-model="msginfoData.msgdsc" placeholder="请输入描述"></el-input>
					</el-col>
				</el-row> -->
			</el-tabs>
			<!-- 提交按钮 -->
			<div class="contain">
				<el-button type="danger" @click="addMessageHandle" :disabled="true">新增</el-button>
				<!-- <el-button type="danger" @click="answerMessageHandle" :disabled="this.changeDis">已回复</el-button> -->
				<el-button type="danger" @click="sendMessageHandle" :disabled="true">下发通知</el-button>
			</div>
			<div class="table_container">
				<el-table :data="notifyList" style="width: 100%">
					<el-table-column prop="snum" label="序号" min-width="80" show-overflow-tooltip>
						<template slot-scope="scope">
							<span>{{ scope.row.snum || "--" }}</span>
						</template>
					</el-table-column>
					<el-table-column prop="msgdsc" label="消息描述" min-width="260" show-overflow-tooltip>
						<template slot-scope="scope">
							<span>{{ scope.row.msgdsc || "--" }}</span>
						</template>
					</el-table-column>
					<el-table-column prop="notifyStatus" label="状态" min-width="80" show-overflow-tooltip>
						<template slot-scope="scope">
							<span>{{ transformationFun("notifyStatus",scope.row.notifyStatus) || "--" }}</span>
						</template>
					</el-table-column>
					<el-table-column prop="uwuser" label="核保员" min-width="100" show-overflow-tooltip>
						<template slot-scope="scope">
							<span>{{ scope.row.uwuser || "--" }}</span>
						</template>
					</el-table-column>
					<el-table-column prop="sendflag" label="是否已下发" min-width="100" show-overflow-tooltip>
						<template slot-scope="scope">
							<span>{{ transformationFun("notifySendFlag",scope.row.sendflag) || "--" }}</span>
						</template>
					</el-table-column>
					<el-table-column prop="msgsendtm" label="操作时间" min-width="120" show-overflow-tooltip>
						<template slot-scope="scope">
							<span>{{ scope.row.msgsendtm || "--" }}</span>
						</template>
					</el-table-column>
					<el-table-column min-width="100" label="操作" align='center' show-overflow-tooltip>
						<template slot-scope="scope">
							<el-button type="text" size="small" @click="deleteMessageHandle(scope.row.id,scope.row.uwuser)" v-if="scope.row.notifyStatus != 'R' && scope.row.sendflag != 'Y'" :disabled="true">删除</el-button>
							<el-button type="text" size="small" @click="answerMessageHandle(scope.row.id)" v-if="scope.row.notifyStatus != 'R'" :disabled="true">已回复</el-button>
						</template>
					</el-table-column>
				</el-table>
			</div>
		</div>

		<!-- 核保意见 复审才能操作核保意见，结案可以查看 -->
		<div class="contain mt10" v-if="this.routeStatus == 'Z' || this.routeStatus == 'C'">
			<div class="title">
				<span>核保意见</span>
			</div>
			<div class="table_container">
				<el-table :data="conclusionList">
					<el-table-column prop="auditres" label="核保决定">
						<template slot-scope="scope">
							<span>{{ transformationFun("ConclusionInfo",scope.row.auditres) || "--" }}</span>
						</template>
					</el-table-column>
					<el-table-column prop="auditmsg" label="核保意见"></el-table-column>
					<el-table-column prop="sxallamt" label="可投保最高寿险累计限额（元）"></el-table-column>
					<el-table-column prop="zjallamt" label="可投保最高重疾险累计限额（元）"></el-table-column>
					<el-table-column prop="checkdate" label="日期"></el-table-column>
					<el-table-column prop="checkopcde" label="核保员"></el-table-column>
				</el-table>
				<!-- 取创建时间最新的一条 -->
				<el-row>
					<el-col :span="24" style="margin: 15px 0px;">
						<el-col :span="8">
							<el-col :span="3">
								<label class="com-lab">核保决定</label>
							</el-col>
							<el-col :span="8">
								<!-- S-标准体，P-延期，D-拒保，W-撤销 -->
								<!-- 除了标准体，其他都是不通过 -->
								<el-select v-model="conclusionData[0].auditres" placeholder="" size="mini" clearable :disabled="this.changeDis" @change="changeAuditresData">
									<el-option label="请选择" value="U"></el-option>
									<el-option label="标准体" value="S"></el-option>
									<el-option label="延期" value="P"></el-option>
									<el-option label="拒保" value="D"></el-option>
									<el-option label="撤销" value="W"></el-option>
								</el-select>
							</el-col>
						</el-col>
						<el-col :span="8">
							<el-col :span="10">
								<label class="com-lab">可投保最高寿险累计限额（元）</label>
							</el-col>
							<el-col :span="12">
								<el-input :disabled="this.changeDis" type="number" @blur="inputSxallAmt(sxallamt)" v-model="sxallamt" placeholder="0.00"></el-input>
							</el-col>
						</el-col>
						<el-col :span="8">
							<el-col :span="10">
								<label class="com-lab">可投保最高重疾险累计限额（元）</label>
							</el-col>
							<el-col :span="12">
								<el-input :disabled="this.changeDis" type="number" @blur="inputZjallAmt(zjallamt)" v-model="zjallamt" placeholder="0.00"></el-input>
							</el-col>
						</el-col>
					</el-col>
					<el-col :span="24">
						<el-col :span="1">
							<label class="com-lab">核保意见</label>
						</el-col>
						<el-col :span="23">
							<el-input clearable type="textarea" :rows="2" v-model="conclusionData[0].auditmsg" placeholder="请输入内容" :disabled="this.changeDis"></el-input>
						</el-col>
					</el-col>
				</el-row>
			</div>
		</div>

		<!-- 消息白名单 -->
		<div class="contain mt10" v-if="this.conclusionData[0].auditres == 'S'">
			<div class="title">
				<span>消息白名单设置</span>
			</div>
			<el-tabs type="card" v-model="activeNameD">
				<el-row>
					<el-col :span="24">
						<el-col :span="5">
							<el-col :span="6">
								<label class="com-lab">投保起始日</label>
							</el-col>
							<el-col :span="12">
								<el-date-picker v-model="whitelistinfo[0].insstartdte" :disabled="this.changeDis" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="请选择投保起始日" @change="clearTimeSetDefault">
								</el-date-picker>
							</el-col>
						</el-col>
						<el-col :span="5">
							<el-col :span="6">
								<label class="com-lab">投保终止日</label>
							</el-col>
							<el-col :span="12">
								<el-date-picker v-model="whitelistinfo[0].insenddte" :disabled="this.changeDis" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="请选择投保终止日" @change="clearTimeSetDefault">
								</el-date-picker>
							</el-col>
						</el-col>
						<el-col :span="5">
							<el-col :span="6">
								<label class="com-lab">主合同代码</label>
							</el-col>
							<el-col :span="12">
								<el-input v-model="whitelistinfo[0].crtable" :disabled="this.changeDis"></el-input>
							</el-col>
						</el-col>
					</el-col>
				</el-row>
			</el-tabs>
		</div>
		
		<el-dialog title="上传文件" :visible.sync="uploadImgFlag" :close-on-click-modal="false" class="dialog" width="80%">
			<el-form :model="uploadImgDataForm" class="search_container" label-width="120px" ref="uploadImgDataForm">
				<el-row>
					<el-col :span="8">
						<el-form-item>
							<el-col :span="8">
								<span>直联核保流水号</span>
							</el-col>
							<el-col :span="12">
								<el-input v-model="this.seqNumber" clearable disabled></el-input>
							</el-col>
						</el-form-item>
					</el-col>
					<el-col :span="6">
						<el-form-item label="文件类型" prop="file">
						<el-select v-model="uploadImgDataForm.dataType" filterable allow-create default-first-option
							placeholder="请选择" clearable>
							<el-option v-for="item in dataTypes" :key="item.value" :label="item.label" :value="item.value">
							</el-option>
						</el-select>
						</el-form-item>
					</el-col>
					<el-col :span="10">
						<el-form-item prop="filename">
							<el-col :span="10">
								<el-input v-model="uploadImgDataForm.filename" multiple placeholder="请浏览上传文件" clearable></el-input>
							</el-col>
							<el-col :span="6">
								<el-upload ref="upload" :action="actionUrl + '?seqnum=' + seqNumber" list-type="text" :show-file-list="false" :on-success="onSuccess" :on-error="onError" :headers="myHeaders" accept=".tif,.pdf,.png,.jpg,.PNG,.JPG,.JPEG,.jpeg" :before-upload="handleBeforeUpload" :disabled="!enabledUploadBtn">
									<el-button size="mini" type="danger" style="margin-left:10px"> 浏 览 </el-button>
								</el-upload>
							</el-col>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row>
					<el-col :span="24">
						<el-table :data="newfilesdataList" border>
							<el-table-column prop="recid" label="序号" width="100" align="center"></el-table-column>
							<el-table-column prop="imagename" label="文件名" align="center" show-overflow-tooltip></el-table-column>
							<el-table-column prop="fileType" label="文件类型" align="center" show-overflow-tooltip width="200px">
							</el-table-column>
							<el-table-column prop="createTime" label="上传时间" align="center" show-overflow-tooltip width="180px">
							</el-table-column>
							<el-table-column fixed="right" align="center" label="操作" width="120">
								<template slot-scope="scope">
									<el-button @click.native.prevent="deleteUpLoadRow(scope.$index, newfilesdataList)" type="text" size="small">删除</el-button>
								</template>
							</el-table-column>
						</el-table>
					</el-col>
				</el-row>
			</el-form>
			<div slot="footer" style="text-align: center;">
				<!-- <el-button type="danger" @click="repaircasedBtn">确 定</el-button> -->
				<el-button plain @click="uploadImgCancel">确 定</el-button>
			</div>
		</el-dialog>

		<!-- 右侧保存按钮 -->
		<!-- <div class="suspend">
			<div class="img-con mb5" v-if="routeStatus == 'Z' || this.messageDis" style="cursor:not-allowed">
				<el-tooltip class="item fixd_botton_dark" effect="dark" content="保存" placement="left">
					<span class="fixd_botton"><img :src="saveImg" style="width:40px;height:40px;" alt="保存"></span>
				</el-tooltip>
			</div>
			<div class="img-con mb5" v-if="routeStatus != 'Z' && !this.messageDis" @click="savePreAudit()">
				<el-tooltip class="item fixd_botton_dark" effect="dark" content="保存" placement="left">
					<span class="fixd_botton"><img :src="saveImg" style="width:40px;height:40px;" alt="保存"></span>
				</el-tooltip>
			</div>
		</div> -->
		<!-- 弹框 影像信息 -->
		<el-dialog title="影像信息" :visible.sync="imagInfoDialog" width="60%" center>
			<el-form ref="form" label-width="140px" :model="imagInfoParams">
				<el-row>
				<el-col :span="12">
					<el-form-item label="业务类型">
					<el-select v-model="imagInfoParams.busiType" placeholder="" :disabled="disableParam.busiType">
						<el-option v-for="item in busiTypeList" :key="item.value" :label="item.label" :value="item.value">
						</el-option>
					</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="受理号">
					<el-input v-model="imagInfoParams.busiNo" placeholder="请输入内容" :disabled="disableParam.busiNo"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="单证类型">
					<el-input v-model="imagInfoParams.docTyp" placeholder="电子投保书（意外健康险）"
								:disabled="disableParam.docTyp"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="存仓号码">
					<el-input v-model="imagInfoParams.stockID" placeholder="" :disabled="disableParam.stockID"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="组号">
					<el-input v-model="imagInfoParams.groupNo" placeholder="请输入内容"
								:disabled="disableParam.groupNo"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="是否新受理">
					<el-select v-model="imagInfoParams.subbusitype" placeholder="" :disabled="disableParam.subbusitype">
						<el-option
							v-for="item in imagInfoDialogSubbusitype"
							:key="item.value"
							:label="item.label"
							:value="item.value">
						</el-option>
					</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="险种类型">
					<el-select v-model="imagInfoParams.productType" placeholder="" :disabled="disableParam.productType">
						<el-option
							v-for="item in imagInfoDialogProductType"
							:key="item.value"
							:label="item.label"
							:value="item.value">
						</el-option>
					</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="是否列印(有效性)">
					<el-select v-model="imagInfoParams.isPrint" placeholder="" :disabled="disableParam.isPrint">
						<el-option
							v-for="item in isPrintList"
							:key="item.value"
							:label="item.label"
							:value="item.value">
						</el-option>
					</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="是否打印HardCopy">
					<el-select v-model="imagInfoParams.ishcprint" placeholder="" :disabled="disableParam.ishcprint">
						<el-option
							v-for="item in isPrintList"
							:key="item.value"
							:label="item.label"
							:value="item.value">
						</el-option>
					</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="版本">
					<el-input v-model="imagInfoParams.version" placeholder="请输入内容"
								:disabled="disableParam.version"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="扫描日期">
					<el-date-picker
						:disabled="disableParam.scanDate"
						value-format="yyyy-MM-dd"
						v-model="imagInfoParams.scanDate"
						type="date"
						placeholder="选择日期" id="scanDate">
					</el-date-picker>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="扫描时间">
					<el-time-select
						:disabled="disableParam.scanTime"
						v-model="imagInfoParams.scanTime"
						:picker-options="{
								start: '00:00',
								step: '00:15',
								end: '24:00'
							}"
						placeholder="选择时间" id="scanTime">
					</el-time-select>
					</el-form-item>
				</el-col>
				</el-row>
			</el-form>
			<span slot="footer" class="dialog-footer">
				<el-button @click="imagInfoDialog = false">取消</el-button>
				<!-- <el-button :disabled="disableParam.btnCopy" @click="imageInfoAlter('copy')" class="Defaultbutton">拷贝</el-button>
				<el-button :disabled="disableParam.btnModify" @click="imageInfoAlter('modify')"
						class="Defaultbutton">修改</el-button>
				<el-button :disabled="disableParam.btnDel" @click="imageInfoAlterDelJudge('del')"
						class="Defaultbutton">删除</el-button> -->
			</span>
		</el-dialog>
		<!-- 提交按钮 -->
		<div class="contain text_center">
			<el-button type="danger" @click="goBack">返 回</el-button>
			<!-- <el-button type="danger" class="Defaultbutton" @click="submitUnderWriting()" :disabled="this.changeDis">提 交</el-button> -->
			<el-button type="danger" class="Defaultbutton" @click="submitUnderWriting()" :disabled="this.zchangeDis">转初审</el-button>
		</div>
	</div>
</template>

<script>
	import transformation from "@/utils/transformation/qualityInspection"; // 数据翻译
	import TaskConstants, {
		call,exportData
	} from "@/api/taskManager/common"; // 导出文件：exportData
	// 导入CMImage影像公用js组件
	import sunCMImage from '@/utils/sunCMImage';
  	import {formatDate, strLength} from '@/utils/mUtils';
	import constant from '@/utils/constant';
	import moment from 'moment';
	import { getToken } from '@/utils/auth' // 验权(从cookie中获取)
	import { Console } from 'console';
	import {
		queryPreUnderDetailsApi,
		doSendApi,
		saveMsgInfoApi,
		queryMsgInfoApi,
		deleteMsgInfoApi,
		updateMsgInfoStatusApi,
		getNotifyStatusApi,
		updateMsgInfoByMainApi,
		commitPreAuditApi,
		imageUploadApi,
		uploadImageSaveApi,
		queryUploadImageApi,
		queryPreUnderWritingStatusApi,
		addLockApi,
		queryLockStatusApi,
		savePreAuditApi,
		deletePreUnderImageApi,
		downloadPreUderImageApi,
		commitWaitReplyApi
	} from "@/api/taskCenter/directUnderwriteDetail"; //调接口
	import {
		getDocTypeMap,
		getSsyOrgMap,
		ImageExtendAlter,
		ImageExtendCheck,
		ImageQuerySearch, 
		recordLogInfo
	} from "@/api/taskCenter/taskCommon";
	// import saveImg from '@/assets/img/botton/preserve.png'; //保存图标

	export default {
		name:'directUnderwriteMessDetail',
		data() {
			return {
				// saveImg: saveImg, // 悬浮按钮图标
				notifyListStatus : true, // 消息回复状态，R为已回复，否则是未回复
				activeNameA: 'first',
				activeNameB: 'four',
				activeNameC: 'eight',
				activeNameD: 'eleven',
				imageDataList: [], // 影像系统数据list
				planList:[], // 投保计划
				userInfo:{}, // 存储用户信息
				imageList: [],
				taskNo: '',
				imagInfoDialog : false, // 影像弹窗显示控制
				showImageFlag: false,
      			showImageApplnum: '',
				clm_uw: 'CLM',//只针对理赔二核的影像查询特殊处理标记
				planType: TaskConstants.prePlanType,
				occType: TaskConstants.preOccType,
				idType: TaskConstants.preIdType,
				prepNo: '',
				routeid:'',
				caseNum:'',
				img_src:'',
				dealTime:'',
				activeName: {},
				eurgs: [],
				now: moment().format("YYYY-MM-DD"),
				showAdd: false,
				showAddButton:false,
				busUserName: '',
				busUserCompany: '',
				busUserChannel: '',
				insuredList:{
					surname : '', // 客户姓名
					roleflag : '', // 客户角色：1 - 投保人  2 - 被保人  4 - 第二被保人
					cltdob : '', // 客户生日
					cltsex : '', // 客户性别
					secuityno : '', // 证件号码
					secuityType : '', // 证件类型
					secuityTypeCHN : '', // 证件类型
					occpcden : '', // 职业代码
					mortcls : '', // 职业等级
					occupname : '' // 职业名称
				}, // 投/被保人信息
				// mainInfoList:{
				// 	applnum : '', // 案件号
				// 	chdrnum : '' // 保单号
				// },
				historyList:[{
					id:'',
					claimHistoryDesc:'' // 理赔史描述
				}], // 理赔史
				medicalList:[{
					id : '',
					medicaldesc: '', // 健康告知
					medicaltype:'1'
				},{
					id : '',
					medicaldesc: '', // 既往体检报告
					medicaltype:'2'
				},{
					id : '',
					medicaldesc: '', // 达标体检
					medicaltype:'3'
				}], // 医务信息
				medicalTempInfo:[],// 医务信息临时变量
				financialList:[{
					id : '', // 收入类
					findesc : '',
					fintype : ''
				},{
					id : '', // 资产类
					findesc : '',
					fintype : ''
				},{
					id : '', // 第三方平台/公共平台(正面)
					findesc : '',
					fintype : ''
				},{
					id : '', // 第三方平台/公共平台(负面)
					findesc : '',
					fintype : ''
				},], // 财务信息
				//辅助条件——业务类型选择
				busiTypeList: [
					{
						value: 'ALL',
						label: '全部'
					}, {
						value: 'NB',
						label: '投保'
					}, {
						value: 'POS',
						label: '保全'
					}, {
						value: 'CLM',
						label: '理赔'
					}
				],
				//影像信息-险种信息选择
				imagInfoDialogProductType: [{
					value: '传统寿险',
					label: '传统寿险'
					}, {
					value: '意外险',
					label: '意外险'
					}, {
					value: '银行险',
					label: '银行险'
					}, {
					value: '重填',
					label: '重填'
					}, {
					value: '变更',
					label: '变更'
					}, {
					value: '投资连结',
					label: '投资连结'
				}],
				//辅助条件——是否列印（有效性）选择
				isPrintList: [{
					value: '1',
					label: '是'
					}, {
					value: '0',
					label: '否'
				}],
				//是否新受理
				imagInfoDialogSubbusitype: [{
					value: 'Y',
					label: '是'
					}, {
					value: 'N',
					label: '否'
				}],
				//影像信息
				// imagInfoParamshandle: {
				// 	busiType: '', //业务类型
				// 	policyNo: '', //保单号
				// 	busiNo: '', //受理号
				// 	subbusitype: '', //是否新受理（空时候显示空，不为空时显示该值；子业务类型）
				// 	productType: '', //险种类型
				// 	docTyp: '', //单证类型
				// 	stockID: '', //存仓号
				// 	groupNo: '', //组号
				// 	scanDate: '', //扫描日期
				// 	scanTime: '', //扫描时间
				// 	updateflag: '', //
				// 	isPrint: '', //是否列印（1是，0否）
				// 	ishcprint: '', //是否打印
				// 	version: '', //版本
				// 	itemid: '', //
				// 	pidString: '', //
				// 	company: '', //
				// 	repdate: '', //
				// 	agentNo: '', //
				// 	agentName: '', //
				// 	stype: '',
				// 	scansite: '',
				// 	srepdate: '',
				// 	sagentid: '',
				// 	sagentname: '',
				// 	sbankname: ''
				// },
				imagInfoParams: {
					busiType: '', //业务类型
					policyNo: '', //保单号
					busiNo: '', //受理号
					subbusitype: '', //是否新受理（空时候显示空，不为空时显示该值；子业务类型）
					productType: '', //险种类型
					docTyp: '', //单证类型
					stockID: '', //存仓号
					groupNo: '', //组号
					scanDate: '', //扫描日期
					scanTime: '', //扫描时间
					updateflag: '', //
					isPrint: '', //是否列印（1是，0否）
					ishcprint: '', //是否打印
					version: '', //版本
					itemid: '', //
					pidString: '', //
					company: '', //
					repdate: '', //
					agentNo: '', //
					agentName: '' //
				}, //影像信息
				//用于改变各个元素的可编辑状态
				disableParam: {
					sbusiType: true, //搜索辅助条件——文件类型
					busiType: true,
					policyNO: true,
					busiNo: true,
					subbusitype: true,
					productType: true,
					docTyp: true,
					stockID: true,
					groupNo: true,
					isPrint: true,
					ishcprint: true,
					version: true,
					scanDate: true,
					scanTime: true,
					btnCopy: true,
					btnModify: true,
					btnDel: true,
					//财务影像管理
					scansite: true,
					srepdate: true,
					sagentid: true,
					sagentname: true,
					sbankname: true
				},
				financialTempInfo : [], // 财务信息临时变量
				checkInfoList : [{
					id : '', // 同业排查
					checktype : '',
					checkdesc : ''
				},{
					id : '', // 医保排查
					checktype : '',
					checkdesc : ''
				},{
					id : '', // 生存调查
					checktype : '',
					checkdesc : ''
				}], // 排查信息
				checkInfoTempData:[],// 排查信息临时变量
				comprehensiveList : [{
					assesstype : '', // 医务评估
					id : '', 
					assessdesc : ''
				},{
					id : '', // 财务评估
					assesstype : '',
					assessdesc : ''
				},{
					id : '', // 综合小结
					assesstype : '',
					assessdesc : ''
				}], // 初审意见
				evaluationTempData : [],// 直联核保综合评估意见临时变量
				loading: false,
				routeStatus : '', // 路由传入的状态
				changeDis : false, // 禁用:结案状态
				zchangeDis : false, // 禁用:转初审按钮
				messageDis : false, // 禁用:待处理状态
				endDis : false, // 禁用:复核状态
				notifyList:[], // 消息作业表格数据
				conclusionList : [], // 核保意见表格数据
				conclusionData : [{
					id : "",
					auditmsg : "", // 核保意见
					auditres : "U", // 核保决定 
					checkopcde:"", // 操作员
					checkdate : "" // 操作时间
				}], // 核保意见输入内容
				sxallamt : '', // 可投保最高寿险累计限额
				zjallamt : '', // 可投保最高重疾险累计限额
				whitelistinfo : [{
					id : "",
					sxallamt : '', // 可投保最高寿险累计限额
					zjallamt : '', // 可投保最高重疾险累计限额
					insstartdte : "",
					insenddte : "",
					crtable : ""
				}], // 白名单信息
				msginfoData:{
					// msgtypeCode : '', // 消息类型码值
					msgtypeDesc : '', // 消息类型描述
					msgdsc : '' // 消息内容
				}, // 消息作业
				actionUrl: TaskConstants.apis.preUnderUpload, // 文件上传路由
				myHeaders:{'Authorization': getToken(constant.TOKEN) || ''},
				enabledUploadBtn: true, // 上传文件状态
				uploadBtnIcon: "el-icon-upload2", // 上传文件图标
				seqNumber : "", // 直联核保流水号，必传
				docno : "", // 电子流水号
				notifyStatus : "W", // 消息状态默认待回复：W
				fileListData:[{
					tifPath: "", // 影像文件路径
					documentName: "", // 理赔申请表，暂时用直联流水号
					imageName: "", // 影像文件名称
					formType: "直联核保影像信息", // 数据类型，暂时默认直联核保影像信息
					documentClassName: "", // 理赔申请表，暂时用直联流水号
					fileType: "", // 文件类型
					taskNo: "", // 任务号
					poNo: "" // 保单号
				}], // 文件导入数据
				//需要给分页组件传的信息
				paginations: {
					total: 0, // 总数
					pageIndex: 1, // 当前位于哪页
					pageSize: 10, // 1页显示多少条
					pageSizes: [5, 10, 15, 20], //每页显示多少条
					layout: "total, sizes, prev, pager, next, jumper" // 翻页属性
				},
				newfilesdataList : [], // 上传文件弹窗内列表
				uploadImgFlag : false, // 上传文件弹窗显示
				uploadImgDataForm : {
					filename : '',
					dataType : '',
					seqnum : ''
				}, // 上传文件参数
				dataTypes:[
					{label: '财务证明',	value: '财务证明'},
					{label: '体检报告单',	value: '体检报告单'},
					{label: '日常事务联系单',	value: '日常事务联系单'},
					{label: '高额保险财务告知书',	value: '高额保险财务告知书'},
					{label: '投保人身份证复印件',	value: '投保人身份证复印件'},
					{label: '被保人身份证复印件',	value: '被保人身份证复印件'},
					{label: '被保人一身份证复印件',	value: '被保人一身份证复印件'},
					{label: '被保人二身份证复印件',	value: '被保人二身份证复印件'},
					{label: '补充告知声明书',	value: '补充告知声明书'},
					{label: '医疗问卷',	value: '医疗问卷'}
				], // 文件上传类型下拉框
				dataTypesNotify:[
					{label: '财务证明',	value: '1'},
					{label: '体检报告单',	value: '2'},
					{label: '日常事务联系单',	value: '3'},
					{label: '高额保险财务告知书',	value: '4'},
					{label: '投保人身份证复印件',	value: '5'},
					{label: '被保人身份证复印件',	value: '6'},
					{label: '被保人一身份证复印件',	value: '7'},
					{label: '其他',	value: '8'}
				], // 文件上传类型下拉框
				searchParams: {
					//业务查询条件
					busiNO: '', //受理号
					policyNO: '', //保单号
					policyer: '', //投保人姓名
					insured: '', //被保险人姓名
					//影像查询条件
					stockID: '', //存仓号码
					groupNO: '', //组号
					begintime: '', //扫描日期
					serno: '', //电子标识号
					policyno16: '', //短期险保单号
					//辅助条件
					busiType: '', //业务类型
					birthday: '', //被保险人出生日期
					comCode: '', //分支公司
					productType: '', //险种类型
					isPrint: '', //是否列印（有效性）
					imgsortorder1: '', //排序条件1
					imgsortorder2: '', //排序条件2
					imgsortorder3: '', //排序条件3
					imgsort: '', //排序方式
					docType: '', //文件类型
					isNoCaseno: '', //是否查询无受理号的补充文件

					branchCode: '', //分支公司
					stype: '', //文件类型
					spurview: '', //查看权限

					sdocType: '', //文件类型
					sproductType: '' //险种类型
				}, // 影像文件查询参数
				judgeParam: {
					stype: 'nb', //文件类型
					spurview: 'low' //查看权限
				},
			}
		},
		created() {
			this.userInfo = JSON.parse(localStorage.getItem(getToken('token'))).userKeyInfo;
		},
		methods: {
			goBack(){
				this.$router.back(-1);
			},
			// 数据转换
			transformationFun(type, status) {
				return transformation.transformation(type, status);
			},
			// 保存接口
			savePreAudit(){
				// 调用保存接口
				this.show();
				let params = {};
				if(this.routeStatus == 'A' || this.routeStatus == 'W'){
					params = {
						applnum : this.seqNumber, // 案例号
						// chdrnum : this.seqNumber, // 保单号
						historyList : this.historyList, // 理赔历史
						medicalList : this.medicalList, // 医务信息数据
						financialList : this.financialList, // 财务信息数据
						checkInfoList : this.checkInfoList, // 排查信息
						comprehensiveList : this.comprehensiveList, // 综合意见
						seqnum : this.seqNumber, // 流水号
						sourceFlag : this.routeStatus, // 审核状态
						procecode : this.routeStatus, // 审核状态
					}
				}else if(this.routeStatus == 'C'){
					params = {
						conclusionList : this.conclusionData, // 核保意见
						seqnum : this.seqNumber, // 流水号
						sourceFlag : this.routeStatus, // 审核状态
						procecode : this.routeStatus, // 审核状态
						whitelist : this.whitelistinfo, // 白名单信息
						planlist : this.planList // 投保计划
					}
				}
				savePreAuditApi(params).then((res) => {
					if (res.resultCode === 0) {
						this.cancle();
						this.$message({message: '保存信息成功！',type: "success",showClose: true});
						doSendApi(this.seqNumber).then((res) => {
							if (res.resultCode === 0) {
								updateMsgInfoByMainApi(this.seqNumber).then((res) => {
									if (res.resultCode === 0) {
										this.cancle();
										// 返回消息展示待确认
										// this.$message({message: '下发通知通知成功',type: "success",showClose: true});
										// this.changeDis = true;
										// this.messageDis = true;
										// this.enabledUploadBtn = false;
										this.$confirm('下发通知成功，请确认是否关闭页面', '提示', {
											confirmButtonText: '确定',
											cancelButtonText: '取消',
											type: 'warning'
										}).then(() => {
											let tagActiveArr = JSON.parse(sessionStorage.getItem('tagActive'));
											// console.log(tagActiveArr)
											tagActiveArr.forEach((item,index)=>{
												if(item.path.indexOf(this.seqNumber) != -1){
													tagActiveArr.splice(index,1);
												}
											});
											// 关闭页签
											sessionStorage.setItem('tagActive',JSON.stringify(tagActiveArr));
											this.$router.push({ path: "/home/taskCenter/pre/directUnderwriteMess"});
										}).catch(()=>{
											// 提交成功后，将所有操作全部禁用
											// this.changeDis = true;
											// this.messageDis = true;
											// this.enabledUploadBtn = false;
										});
									}else{
										this.cancle();
										// this.$message({message: res.resultMsg,type: "warning",showClose: true});
									}
								}).catch((err) => {
									this.cancle();
									// this.$message({message: "更新主档表状态发生异常",type: "warning",showClose: true});
								});
							}else{
								this.cancle();
								// this.$message({message: res.resultMsg,type: "warning",showClose: true});
							}
						}).catch((err) => {
							this.cancle();
							// this.$message({message: "下发通知通知发生异常",type: "warning",showClose: true});
						});
					}else{
						this.cancle();
						// this.$message({message: res.resultMsg,type: "warning",showClose: true});
					}
				}).catch((err) => {
					this.cancle();
					// this.$message({message: res.resultMsg ,type: "warning",showClose: true});
				});
			},
			// 上传列表查询接口
			queryImage(){
				queryUploadImageApi(this.seqNumber).then((res) => {
					if (res.resultCode === 0) {
						// 重置序号
						let imgList = res.data.list;
						let i = 0;
						imgList.forEach(e=>{
							i+=1;
							e.recid = i;
						});
						// 展示列表
						this.imageList = imgList;
						this.newfilesdataList = imgList;
					}else{
						this.cancle();
						// this.$message({message: res.resultMsg,type: "warning",showClose: true});
					}
				}).catch((err) => {
					this.cancle();
					// this.$message({message: res.resultMsg ,type: "warning",showClose: true});
				});
			},
			onSuccess(response, file, fileList) {
				if (response.resultCode == constant.SUCCESS) {
					this.show();
					// let params = {
					// 	seqnum : this.seqNumber,
					// 	clmnum : this.seqNumber,
					// 	chdrnum : this.seqNumber,
					// 	fileList : this.fileListData
					// };
					// imageUploadApi(params).then((res) => {
					// 	if (res.resultCode === 0) {
							let saveParams = {
								seqnum : this.seqNumber,
								imagename : this.fileListData[0].imageName,
								imagepath : response.data,
								imagetype : this.fileListData[0].fileType,
								createId : this.userInfo.account,
								documentName : this.uploadImgDataForm.dataType,
								formType : this.uploadImgDataForm.dataType,
								documentClassName : "核保受理",
								taskNo : this.seqNumber,
								tifPath : response.data,
								fileType : this.uploadImgDataForm.dataType,
								isUpdate: "N",
								buisType : "NB",
							}
							uploadImageSaveApi(saveParams).then((res) => {
								if (res.resultCode === 0) {
									this.cancle();
									this.$message({message: '文件上传成功！',type: "success",showClose: true});
									this.queryImage();
									// 刷新查看影像
									// this.getList();
								}else{
									this.cancle();
									// this.$message({message: res.resultMsg,type: "warning",showClose: true});
								}
							}).catch((err) => {
								this.cancle();
								// this.$message({message: res.resultMsg ,type: "warning",showClose: true});
							});
						// }else{
						// 	this.cancle();
						// 	// this.$message({message: res.resultMsg,type: "warning",showClose: true});
						// }
					// }).catch((err) => {
					// 	this.cancle();
					// 	// this.$message({message: res.resultMsg ,type: "warning",showClose: true});
					// });
				} else {
					this.$message({
						message: '文件上传失败！',
						type: 'error'
					});
				}
				this.enabledUploadBtn = true;
				this.uploadBtnIcon = 'el-icon-upload2';
			},
			onError(err, file, fileList) {
				this.enabledUploadBtn = true;
				this.uploadBtnIcon = 'el-icon-upload2';
				this.$message({
					message: '文件上传失败！',
					type: 'error'
				});
			},
			// 上传前处理值
			handleBeforeUpload(file){
				// 校验文件格式和大小，不符合则不允许上传
				var tifFormat = file.name.substring(file.name.lastIndexOf('.')+1);
				this.uploadImgDataForm.filename = file.name;
				var tifSize = file.size / 1024 / 1024 <= 1;
				if(this.uploadImgDataForm.dataType == '' || this.uploadImgDataForm.dataType == undefined){
					this.$message({
						message: '文件类型不能为空，请选择文件类型',
						type: 'warning'
					});
					return false;
				}
				if(!(tifFormat == 'tif' || tifFormat == 'pdf' || tifFormat == 'jpg' || tifFormat == 'png' || tifFormat == 'jpeg' || tifFormat == 'JPG' || tifFormat == 'JPEG' || tifFormat == 'PNG')){
					this.$message({
						message: '影像文件 ' + file.name + ' 格式不正确，请重新上传 .tif、.pdf、.jpg、.png 格式文件',
						type: 'warning'
					});
					return false;
				}
				if (!tifSize) {
					this.$message({
						message: '影像文件 ' + file.name + ' 大小不能超过 1M ',
						type: 'warning'
					});
					return false;
				}
				// 判断中文，中文不给上传
				let isCHN = new RegExp("[\\u4E00-\\u9FFF]+", "g");
				if(isCHN.test(file.name)){
					this.$message({
						message: '影像文件 ' + file.name + ' 文件名存在中文，请修改文件名为字母/数字后重新上传 ',
						type: 'warning'
					});
					return false;
				}
				this.fileListData[0].imageName = file.name; // 文件名赋值
				this.fileListData[0].fileType = file.type; // 文件类型赋值
			},
			// 清空时间
			clearTimeSetDefault(val) {
				if (val == null) {
					val = '';
				}
			},
			show() {
				this.$store.dispatch('loading/CHANGE_LOADING', true);
			},
			cancle() {
				this.$store.dispatch('loading/CHANGE_LOADING', false)
			},
			changeIdType(value) {
				for (let item in this.idType) {
					if (value == this.idType[item]["key"]) {
						value = this.idType[item]["name"];
						break;
					}
				}
				return value;
			},
			changeAuditresData(){
				
			}, // 核保决定下拉框事件
			/* 职业转化 */
			changeOccType(value) {
				for (let item in this.occType) {
					if (value == this.occType[item]["key"]) {
						value = this.occType[item]["name"];
						break;
					}
				}
				return value;
			},
			// 提交直联核保
			submitUnderWriting() {
				this.show();
				let params = {};
				let roundSet = 0;
				// if(this.notifyList.length > 0 && this.$route.params.routeStatus != 'W'){
				// 	this.notifyList.forEach(e=>{
				// 		if(e.notifyStatus != 'R'){
				// 			this.notifyListStatus = false;
				// 			roundSet += 1;
				// 			return ;
				// 		}
				// 	});
				// 	// 避免状态没有更新，加入统计，只要>0 说明存在未回复的消息
				// 	if(roundSet == 0){
				// 		this.notifyListStatus = true;
				// 	}
				// 	if(!this.notifyListStatus){
				// 		this.cancle();
				// 		this.$message({message: '存在待回复的消息，请处理完成后进行提交',type: "warning",showClose: true});
				// 		return ;
				// 	}
				// }
				// 如果当前状态不一致不允许提交
				queryPreUnderWritingStatusApi(this.$route.params.seqnum,this.$route.params.routeStatus).then((res) => {
					if (res.resultCode === 0) {
						// 存在未回复时不允许提交初审
						// if(this.notifyListStatus){
							if(this.routeStatus == 'A' || this.routeStatus == 'W'){
								params = {
									applnum : this.seqNumber, // 案例号
									historyList : this.historyList, // 理赔历史
									medicalList : this.medicalList, // 医务信息数据
									financialList : this.financialList, // 财务信息数据
									checkInfoList : this.checkInfoList, // 排查信息
									comprehensiveList : this.comprehensiveList, // 综合意见
									seqnum : this.seqNumber, // 流水号
									sourceFlag : this.routeStatus, // 审核状态
									procecode : this.routeStatus, // 审核状态
									lastUpdateId : this.userInfo.account
								}
							}else if(this.routeStatus == 'C'){
								if(this.conclusionData[0].auditres == 'U' || this.conclusionData[0].auditres == '' || this.conclusionData[0].auditres == undefined){
									this.cancle();
									this.$message({message: '请选择核保决定',type: "warning",showClose: true});
									return ;
								}
								if(this.conclusionData[0].auditres == 'S'){
									// 标准体时，必录
									if((this.sxallamt == undefined || this.sxallamt == '') && (this.zjallamt == undefined || this.zjallamt == '')){
										this.cancle();
										this.$message({message: '当核保决定为标准体时，可投保最高寿险累计限额 和 可投保最高重疾险累计限额都不能为空！',type: "warning",showClose: true});
										return ;
									}
									if(this.sxallamt == undefined || this.sxallamt == ''){
										this.cancle();
										this.$message({message: '当核保决定为标准体时，可投保最高寿险累计限额不能为空！',type: "warning",showClose: true});
										return ;
									}
									if(this.zjallamt == undefined || this.zjallamt == ''){
										this.cancle();
										this.$message({message: '当核保决定为标准体时，可投保最高重疾险累计限额不能为空！',type: "warning",showClose: true});
										return ;
									}
									if(this.sxallamt < 0 && this.zjallamt < 0){
										this.cancle();
										this.$message({message: '当核保决定为标准体时，可投保最高寿险累计限额 和 可投保最高重疾险累计限额都不能小于0！',type: "warning",showClose: true});
										return ;
									}
									if(this.sxallamt < 0){
										this.cancle();
										this.$message({message: '当核保决定为标准体时，可投保最高寿险累计限额不能小于0！',type: "warning",showClose: true});
										return ;
									}
									if(this.zjallamt < 0){
										this.cancle();
										this.$message({message: '当核保决定为标准体时，可投保最高重疾险累计限额不能小于0！',type: "warning",showClose: true});
										return ;
									}
									if((this.whitelistinfo[0].insstartdte == '' || this.whitelistinfo[0].insstartdte == undefined) && (this.whitelistinfo[0].insenddte == '' || this.whitelistinfo[0].insenddte == undefined) && this.whitelistinfo[0].crtable == '' || this.whitelistinfo[0].crtable == undefined){
										this.cancle();
										this.$message({message: '当核保决定为标准体时，投保起始日、投保终止日和主合同代码都不能为空！',type: "warning",showClose: true});
										return ;
									}
									if((this.whitelistinfo[0].insstartdte == '' || this.whitelistinfo[0].insstartdte == undefined) && (this.whitelistinfo[0].insenddte == '' || this.whitelistinfo[0].insenddte == undefined)){
										this.cancle();
										this.$message({message: '当核保决定为标准体时，投保起始日和投保终止日都不能为空！',type: "warning",showClose: true});
										return ;
									}
									if((this.whitelistinfo[0].insstartdte == '' || this.whitelistinfo[0].insstartdte == undefined) && this.whitelistinfo[0].crtable == '' || this.whitelistinfo[0].crtable == undefined){
										this.cancle();
										this.$message({message: '当核保决定为标准体时，投保起始日和主合同代码都不能为空！',type: "warning",showClose: true});
										return ;
									}
									if((this.whitelistinfo[0].insenddte == '' || this.whitelistinfo[0].insenddte == undefined) && this.whitelistinfo[0].crtable == '' || this.whitelistinfo[0].crtable == undefined){
										this.cancle();
										this.$message({message: '当核保决定为标准体时，投保终止日和主合同代码都不能为空！',type: "warning",showClose: true});
										return ;
									}
									if(this.whitelistinfo[0].insstartdte == '' || this.whitelistinfo[0].insstartdte == undefined){
										this.cancle();
										this.$message({message: '当核保决定为标准体时，投保起始日不能为空！',type: "warning",showClose: true});
										return ;
									}
									if(this.whitelistinfo[0].insenddte == '' || this.whitelistinfo[0].insenddte == undefined){
										this.cancle();
										this.$message({message: '当核保决定为标准体时，投保终止日不能为空！',type: "warning",showClose: true});
										return ;
									}
									if(this.whitelistinfo[0].crtable == '' || this.whitelistinfo[0].crtable == undefined){
										this.cancle();
										this.$message({message: '当核保决定为标准体时，主合同代码不能为空！',type: "warning",showClose: true});
										return ;
									}
								}
								if(this.conclusionData[0].auditmsg == '' || this.conclusionData[0].auditmsg == undefined){
									this.cancle();
									this.$message({message: '请输入核保意见',type: "warning",showClose: true});
									return ;
								}
								this.conclusionData[0].checkopcde = this.userInfo.account;
								this.conclusionData[0].checkdate = this.formatDate(new Date(), "yyyy-MM-dd hh:mm:ss");
								this.whitelistinfo[0].sxallamt = this.sxallamt;
								this.whitelistinfo[0].zjallamt = this.zjallamt;
								params = {
									conclusionList : this.conclusionData, // 核保意见
									seqnum : this.seqNumber, // 流水号
									sourceFlag : this.routeStatus, // 审核状态
									procecode : this.routeStatus, // 审核状态
									whitelist : this.whitelistinfo, // 白名单信息
									planlist : this.planList // 投保计划
								}
							}
							if(this.routeStatus == 'A' || this.routeStatus == 'C'){
								this.cancle();
								this.$confirm('请确认是否提交数据', '提示', {
									confirmButtonText: '确定',
									cancelButtonText: '取消',
									type: 'warning'
								}).then(() => {
									this.show();
									commitPreAuditApi(params).then((res) => {
										if (res.resultCode === 0) {
											this.cancle();
											this.routePushClose();
										}else{
											this.cancle();
											// this.$message({message: res.resultMsg,type: "warning",showClose: true});
										}
									}).catch((err) => {
										this.cancle();
										// this.$message({message: res.resultMsg ,type: "warning",showClose: true});
									});
								}).catch(()=>{
									this.cancle();
								});
							}else if(this.routeStatus == 'W'){
								this.cancle();
								this.$confirm('请确认是否转初审', '提示', {
									confirmButtonText: '确定',
									cancelButtonText: '取消',
									type: 'warning'
								}).then(() => {
									this.show();
									// 转初审
									commitWaitReplyApi(params).then((res) => {
										if (res.resultCode === 0) {
											this.cancle();
											// let fileListData = this.newfilesdataList;
											// fileListData.forEach(e=>{
											// 	e.imageName = e.imagename;
											// 	e.taskNo = e.seqnum;
											// 	e.tifPath = e.imagepath;
											// });
											// 提交成功后禁用
											this.zchangeDis = true;
											this.routePushClose();
											// // 如果待处理页面，调用影像接口
											// let params = {
											// 	seqnum : this.seqNumber,
											// 	clmnum: "",
											// 	chdrnum:"",
											// 	fileList : fileListData
											// };
											// imageUploadApi(params).then((res) => {
											// 	if (res.resultCode === 0) {
											// 		this.cancle();
											// 		this.routePushClose();
											// 	}else{
											// 		this.cancle();
											// 	}
											// }).catch((err) => {
											// 	this.cancle();
											// });
										}else{
											this.cancle();
											// this.$message({message: res.resultMsg,type: "warning",showClose: true});
										}
									}).catch((err) => {
										this.cancle();
										// this.$message({message: res.resultMsg ,type: "warning",showClose: true});
									});
								}).catch(()=>{
									this.cancle();
								});
							}
						// }
					}else{
						this.cancle();
						// this.$message({message: res.resultMsg ,type: "warning",showClose: true});
					}
				}).catch((err) => {
					this.cancle();
					// this.$message({message: res.resultMsg ,type: "warning",showClose: true});
				});
			},
			// 页签关闭提示
			routePushClose(){
				let mess = "数据提交成功，数据状态已经流转，请确认是否关闭页面";
				if(this.routeStatus == 'W'){
					mess = "转初审成功，请确认是否关闭页面";
				}
				this.$confirm(mess, '提示', {
					confirmButtonText: '确定',
					cancelButtonText: '取消',
					type: 'warning'
				}).then(() => {
					let tagActiveArr = JSON.parse(sessionStorage.getItem('tagActive'));
					tagActiveArr.forEach((item,index)=>{
						if(item.path.indexOf(this.seqNumber) != -1){
							tagActiveArr.splice(index,1);
						}
					});
					// 关闭页签
					sessionStorage.setItem('tagActive',JSON.stringify(tagActiveArr));
					if(this.routeStatus == 'A'){
						this.$router.push({ path: "/home/taskCenter/pre/directUnderwriteList"});
					}else if(this.routeStatus == 'C'){
						this.$router.push({ path: "/home/taskCenter/pre/directUnderwriteQuery"});
					}else if(this.routeStatus == 'W'){
						this.$router.push({ path: "/home/taskCenter/pre/directUnderwriteMess"});
					}
				}).catch(()=>{
					// 提交成功后，将所有操作全部禁用
					// this.changeDis = true;
					// this.messageDis = true;
					// this.enabledUploadBtn = false;
				});
			},
			formatDate(date, fmt) {
				date = new Date(date);
				var o = {
					"M+": date.getMonth() + 1, //月份
					"d+": date.getDate(), //日
					"h+": date.getHours(), //小时
					"m+": date.getMinutes(), //分
					"s+": date.getSeconds(), //秒
					"q+": Math.floor((date.getMonth() + 3) / 3), //季度
					S: date.getMilliseconds(), //毫秒
				};
				if (/(y+)/.test(fmt))
					fmt = fmt.replace(
					RegExp.$1,
					(date.getFullYear() + "").substr(4 - RegExp.$1.length)
					);
				for (var k in o)
					if (new RegExp("(" + k + ")").test(fmt))
					fmt = fmt.replace(
						RegExp.$1,
						RegExp.$1.length == 1
						? o[k]
						: ("00" + o[k]).substr(("" + o[k]).length)
					);
				return fmt;
			},
			queryDetails() {
				this.show();
				let params = {
					seqnum : this.seqNumber
				}
				queryPreUnderDetailsApi(params).then((res) => {
					if (res.resultCode === 0) {
						this.cancle();
						if(res.data.infoData != null){
							// 渲染数据到对应表格里面
							// this.mainInfoList = res.data.infoData; // 主档表数据
							this.docno = res.data.docno; // 电子流水号
							this.insuredList = res.data.insureds; // 被保人数据
							this.insuredList.secuityTypeCHN = this.transformationFun("dmttype",this.insuredList.secuityType); // 证件类型翻译
							this.planList = res.data.insurancePlans; // 被保人保险计划数据
							this.planList.forEach((e)=>{
								// 年龄添加空格，让数据不为数字，否则合计时，会进行相加
								e.anbAtCcd = e.anbAtCcd + "岁";
								e.cltsexCHN = this.transformationFun("cltsex",e.cltsex);
							}); // 转换性别为中文
							if(res.data.claimHistory.length > 0){
								this.historyList = res.data.claimHistory; // 理赔史数据
							}
							if(res.data.medicalInfo.length > 0){
								this.medicalList = res.data.medicalInfo; // 医务信息数据
							}
							if(res.data.financialInfo.length > 0){
								this.financialList = res.data.financialInfo; // 财务信息数据
							}
							if(res.data.checkInfo.length > 0){
								this.checkInfoList = res.data.checkInfo; // 排查信息数据
							}
							if(res.data.evaluation.length > 0){
								this.comprehensiveList = res.data.evaluation; // 直联核保综合评估意见数据
							}
							if(res.data.imageDataInfo.length > 0){
								// 重置序号
								let imgList = res.data.imageDataInfo;
								let i = 0;
								imgList.forEach(e=>{
									i+=1;
									e.recid = i;
								});
								this.newfilesdataList = imgList;
								this.imageList = imgList; // 影像信息数据
							}
							if(res.data.msginfo.length > 0){
								this.notifyList = res.data.msginfo; // 消息信息数据
								// 拼接序号
								let num = 0;
								this.notifyList.forEach(e=>{
									num+=1;
									e.snum = num;
								})
							}
							if(res.data.conclusioninfo.length > 0){
								this.conclusionList = res.data.conclusioninfo; // 核保意见数据
								if(this.routeStatus == 'Z' && res.data.conclusioninfo.length > 0){
									this.conclusionData[0] = res.data.conclusioninfo[0];
								}
							}
							if(res.data.whitelistinfo.length > 0){
								this.whitelistinfo = res.data.whitelistinfo; // 白名单信息数据
							}
							// this.whitelistinfo[0].insstartdte = res.data.audStrDte;
							// this.whitelistinfo[0].insenddte = res.data.audEndDte;
							// this.whitelistinfo[0].crtable = res.data.polpln;
							// 查询影像列表
							this.getList();
						}else{
							// 主档表必定有数据，没有数据该单存在问题
							this.$message({message: "查询直联核保主档表数据异常",type: "warning",showClose: true});
						}
					}else{
						this.cancle();
						// this.$message({message: res.resultMsg,type: "warning",showClose: true});
					}
				}).catch((err) => {
					this.cancle();
					// this.$message({message: "查询直联核保详情信息异常",type: "warning",showClose: true});
				});
			},
			/* 获取核保意见列表 */
			queryContents(){
				this.show();
				let param ="?taskno="+this.taskNo
				// call(TaskConstants.apis.queryContents+param).then( result =>{
				// 	if (result.resultCode == constant.SUCCESS && result.data ) {
				// 		this.eurgs=result.data;
				// 	}	
				// })
			},
			download(row) {
				let title = row.imagename;
				title = title.substring(0,title.lastIndexOf("."));
				let path = row.imagepath;
				let prefix = path.substring(path.lastIndexOf(".") ,path.length );
				let param = "?path="+path+"&name="+title;
				let vueObj = this;
				// exportData(vueObj,TaskConstants.apis.downloadPreUderImage+param,null, "post",row.imagename,"application/octet-stream");
				downloadPreUderImageApi(path).then((res) => {
					if (res.resultCode === 0) {
						this.cancle();
						// this.img_src = res;
					}else{
						this.cancle();
						// this.$message({message: res.resultMsg,type: "warning",showClose: true});
					}
				}).catch((err) => {
					this.cancle();
					// this.$message({message: "下载图片时发生异常",type: "warning",showClose: true});
				});
			},
			deleteMessageHandle(id,uwuser){
				if(uwuser != this.userInfo.account){
					this.$message({message: "当前操作员与该消息操作员不一致，禁止删除！",type: "warning",showClose: true});
					return ;
				}
				this.$confirm(`确定进行删除操作?`, "提示", {
					confirmButtonText: "确定",
					cancelButtonText: "取消",
					type: "warning",
				}).then(() => {
					this.show();
					deleteMsgInfoApi(id,this.userInfo.account).then((res) => {
						if (res.resultCode === 0) {
							this.cancle();
							this.$message({message: '删除消息通知成功',type: "success",showClose: true});
							// 调用查询接口
							this.queryMsgInfoData();
						}else{
							this.cancle();
							// this.$message({message: res.resultMsg,type: "warning",showClose: true});
						}
					}).catch((err) => {
						this.cancle();
						// this.$message({message: "删除消息通知发生异常",type: "warning",showClose: true});
					});
				});
			},
			// 消息表格新增消息
			addMessageHandle(){
				// if(this.msginfoData.msgtypeCode == '' || this.msginfoData.msgtypeCode == undefined){
				// 	this.$message({message: "请选择下发消息类型",type: "warning",showClose: true});
				// 	return ;
				// }
				this.show();
				// 转换码值中文描述
				// if(this.msginfoData.msgtypeCode == '1'){
				// 	this.msginfoData.msgtypeDesc = "财务证明";
				// }else if(this.msginfoData.msgtypeCode == '2'){
				// 	this.msginfoData.msgtypeDesc = "体检报告单";
				// }else if(this.msginfoData.msgtypeCode == '3'){
				// 	this.msginfoData.msgtypeDesc = "日常事务联系单";
				// }else if(this.msginfoData.msgtypeCode == '4'){
				// 	this.msginfoData.msgtypeDesc = "高额保险财务告知书";
				// }else if(this.msginfoData.msgtypeCode == '5'){
				// 	this.msginfoData.msgtypeDesc = "投保人身份证复印件";
				// }else if(this.msginfoData.msgtypeCode == '6'){
				// 	this.msginfoData.msgtypeDesc = "被保人身份证复印件";
				// }else if(this.msginfoData.msgtypeCode == '7'){
				// 	this.msginfoData.msgtypeDesc = "被保人一身份证复印件";
				// }else if(this.msginfoData.msgtypeCode == '8'){
				// 	this.msginfoData.msgtypeDesc = "其他";
				// }
				let params = {
					createId : this.userInfo.account,
					uwuser : this.userInfo.account,
					notifyType : this.routeStatus,
					seqnum : this.seqNumber,
					applnum : this.seqNumber,
					msgdsc : this.msginfoData.msgdsc,
					// msgtypeCode : this.msginfoData.msgtypeCode, // 消息类型码值
					msgtypeDesc : this.msginfoData.msgtypeDesc // 消息类型描述
				}
				saveMsgInfoApi(params).then((res) => {
					if (res.resultCode === 0) {
						this.cancle();
						this.$message({message: '保存消息通知成功',type: "success",showClose: true});
						// 调用查询接口
						this.queryMsgInfoData();
					}else{
						this.cancle();
						// this.$message({message: res.resultMsg,type: "warning",showClose: true});
					}
				}).catch((err) => {
					this.cancle();
					// this.$message({message: "保存消息通知发生异常",type: "warning",showClose: true});
				});

			},
			// 消息查询接口
			queryMsgInfoData(){
				queryMsgInfoApi(this.seqNumber).then((res) => {
					if (res.resultCode === 0) {
						this.notifyList = res.data.list;
						// 拼接序号
						let num = 0;
						this.notifyList.forEach(e=>{
							num+=1;
							e.snum = num;
						})
					}else{
						this.cancle();
						// this.$message({message: res.resultMsg,type: "warning",showClose: true});
					}
				}).catch((err) => {
					this.cancle();
					// this.$message({message: "查询消息通知发生异常",type: "warning",showClose: true});
				});
			},
			// 下发通知通知
			sendMessageHandle(){
				if(this.notifyList == undefined || this.notifyList == '' || this.notifyList.length < 1){
					this.cancle();
					this.$message({message: "消息列表为空，不能下发通知",type: "warning",showClose: true});
					return ;
				}
				this.$confirm(`请确认是否需要下发通知?`, "提示", {
					confirmButtonText: "确定",
					cancelButtonText: "取消",
					type: "warning",
				}).then(() => {
					this.show();
					// 保存信息后下发通知
					this.savePreAudit();
				});
			},
			answerMessageHandle(id){
				this.$confirm(`请确认消息是否已经回复?`, "提示", {
					confirmButtonText: "确定",
					cancelButtonText: "取消",
					type: "warning",
				}).then(() => {
					this.show();
					// if(this.routeStatus == 'A'){
					// 	let params = {
					// 		seqnum : this.seqNumber,
					// 		id : id
					// 	}
					// 	getNotifyStatusApi(params).then((res) => {
					// 		if (res.resultCode === 0) {
					// 			this.cancle();
					// 			this.updateMsg(id);
					// 		}else{
					// 			this.cancle();
					// 			this.$message({message: res.resultMsg,type: "warning",showClose: true});
					// 		}
					// 	}).catch((err) => {
					// 		this.cancle();
					// 		this.$message({message: "查询已回复消息通知状态异常",type: "warning",showClose: true});
					// 	});
					// }else{
						this.updateMsg(id);
					// }
				});
			},
			updateMsg(id){
				updateMsgInfoStatusApi(id,this.userInfo.account).then((res) => {
					if (res.resultCode === 0) {
						this.cancle();
						this.$message({message: '更新消息通知回复成功',type: "success",showClose: true});
						// 调用查询接口
						this.queryMsgInfoData();
					}else{
						this.cancle();
						// this.$message({message: res.resultMsg,type: "warning",showClose: true});
					}
				}).catch((err) => {
					this.cancle();
					// this.$message({message: "更新消息通知回复发生异常",type: "warning",showClose: true});
				});
			},
			initData(seqnum,routeStatus){
				// 直联核保状态
				this.routeStatus = routeStatus;
				// 直联核保流水号
				this.seqNumber = seqnum;
				this.uploadImgDataForm.seqnum = seqnum;
				// 结案（Z）状态只能查看,全部禁用：changeDis；消息待处理，只能处理消息部分和影响部分，禁用：messageDis；复核：只能操作消息下发下面三个模块
				if(this.routeStatus == 'Z' || this.routeStatus == 'M'){
					this.changeDis = true;
					this.messageDis = true;
					this.zchangeDis = true;
					this.endDis = false;
					this.enabledUploadBtn = false;
				}else if(this.routeStatus == 'W'){
					this.changeDis = true;
					this.messageDis = true; // 消息处理页面禁用状态控制
					this.zchangeDis = false; // 转初审按钮
					this.endDis = false;
					this.enabledUploadBtn = true;
				}
				// 查询直联核保详情
				this.queryDetails();
			},
			// 影像查询列表方法
			getList() {
				// let count = 0;
				// if (this.applnum == null || this.applnum === "") {
				// 	count++;
				// }
				// if (this.policyNO == null || this.policyNO === "") {
				// 	count++;
				// }
				// if (count === 0) {
				// 	return false;
				// }
				const userId = this.userInfo.account;
				// this.$store.dispatch('loading/CHANGE_LOADING', true);
				// 查出影像列表不需传文件类型
				// if (this.docType != null && this.docType !== "") {
				// 	this.searchParams.docType = this.docType;
				// }
				if (this.docno != null && this.docno !== "") {
					this.searchParams.serno = 'ZL'+this.docno;
				}
				// 没有保单号
				// if (this.policyNO != null && this.policyNO !== "") {
				// 	this.searchParams.policyNO = this.policyNO;
				// // }
				this.searchParams.busiType = 'ALL'; // 默认为核保业务
				// this.searchParams.stype = this.judgeParam.stype;
				this.searchParams.spurview = 'query';
				this.searchParams['doflag'] = "image";

				this.imageDataList = [];
				// if (this.busiType == 'clm_uw') {
				// 	this.searchParams['clmBusiType'] = "clm_uw";
				// }
				ImageQuerySearch(this.searchParams, userId, this.paginations.pageSize, this.paginations.pageIndex).then(res => {
					// this.$store.dispatch('loading/CHANGE_LOADING', false)
					if (res.resultCode == constant.SUCCESS && res.resBody) {
						// 调取成功后渲染影像模块页面
						if (res.strDoFlag == "image" || res.strDoFlag == "caseimage") {
							let tableDataList_t = [];
							let treeData_List = [];
							let busiNo_Map = {}; // 根据保单号划分
							let imglist = res.resBody.imageList;
							imglist.forEach(e=>{
								e.imgServerUrl = res.imageServerUrl;
							});
							this.imageDataList = imglist;
							this.paginations.total = res.resBody.total;
						}
					}
				}).catch(err => {
					// this.$store.dispatch('loading/CHANGE_LOADING', false);
				})
			},
			//文件类型选项方法
			handleSelectionChange(val) {
				this.multipleTable = val;
			},
			// 每页多少条切换
			handleSizeChange(pageSize) {
				this.paginations.pageSize = pageSize;
				this.getList();
			},
			// 上下分页
			handleCurrentChange(page) {
				this.paginations.pageIndex = page;
				this.getList();
			},
			//查看影像修改记录
			// updateRecordGo(busiType, itemid) {
			// 	this.updateRecordDialog = true;
			// 	var userId = this.userInfo.account;
			// 	this.imageExtendParam.doflag = 'modihistory';
			// 	this.imageExtendParam.busitype = busiType;
			// 	this.imageExtendParam.itemid = itemid;
			// 	this.$store.dispatch('loading/CHANGE_LOADING', true)
			// 	ImageExtendCheck(this.imageExtendParam, userId).then(res => {
			// 		this.$store.dispatch('loading/CHANGE_LOADING', false)
			// 		console.log(res.resBody);
			// 		if (res.resultCode == constant.SUCCESS && res.resBody) {
			// 			const updateRecordTableData_s = [];
			// 			for (var i = 0; i < res.resBody.length; i++) {
			// 				const obj = {
			// 					serialNumber: i + 1,
			// 					fielddesc: res.resBody[i].fielddesc,
			// 					srcvalue: res.resBody[i].srcvalue,
			// 					modusrid: res.resBody[i].modusrid,
			// 					modvalue: res.resBody[i].modvalue,
			// 					modtime: res.resBody[i].modtime
			// 				}
			// 				updateRecordTableData_s.push(obj);
			// 			}
			// 			this.updateRecordTableData = updateRecordTableData_s;
			// 		}
			// 	}).catch(err => {
			// 		this.$store.dispatch('loading/CHANGE_LOADING', false);
			// 	})
			// },
			showImage_newObject(item) {
				// 审计日志需求  --lvjg 20211217
				var multipleTable = [item];
				// console.log("影像信息-->", multipleTable);
				this.recordAuditLogInfo("契约直联核保", multipleTable);
				let imageDisplay;
				const str = item.busiType + "," + item.itemid; // busiType,itemid
				try {
					if (str != ",") {
						/*
						imageDisplay = document.getElementById("imageDisplay");
						imageDisplay.DisplayFile(str, item.imgServerUrl); // imgServerUrl
						*/ 
						/* google访问ie内核修改 ---------- sunline注册表模式*/
						sunCMImage.showImage(str,item.imgServerUrl);
					}
				} catch (e) {
					this.$message.error('页面加载错误：' + e);
				}
			},
			// 审计日志需求  --lvjg 20211217
			recordAuditLogInfo(busMod, multipleTable) {
				let userInfo = JSON.parse(sessionStorage.getItem("userInfo"));
				// 时间格式 yyyymmddhhMMss
				var dateStr = formatDate(new Date(), 2);
				var businessInfos = [];
				for (var i = 0; i < multipleTable.length; i++) {
				businessInfos.push({"applNum": multipleTable[i].busiNo
					, "chdrNum": multipleTable[i].policyNo
					, "otherNum": multipleTable[i].serno});
				}
				let params = {
				"head": {
					"sysID": "ILMP",
					"password": "lHW5bPjxPnIIoSR5OFZE9A=="
				},
				"body": {
					"userNum": userInfo.account,
					"optDate": dateStr.substr(0,8),
					"optTime": dateStr.substr(8),
					"userIP": "",
					"userMachine": "",
					"menuName": busMod,
					"funcDesc": "查看客户影像资料",
					"busAction": "R",
					"businessInfos": businessInfos,
					"sensiDesc": busMod + "查看客户影像",
					"remark": ""
				}
				};
				// 暂不调用该接口，必备参数均为空
				// recordLogInfo(params).then(res => {
				// console.log(res);
				// }).catch(err => {
				// console.log(err);
				// });
			},
			hideImageList() {
				this.showImageApplnum = '';
				this.showImageFlag = false;
			},
			//查看影像备注信息
			// memoGo(busiType, itemid) {
			// 	this.memoListDialog = true;
			// 	this.MemoInfoDialogHistory = false;
			// 	this.MemoInfoDialogShow = true;
			// 	this.addMemoInfoDialog = false

			// 	// var userInfo = JSON.parse(getToken(getToken(constant.TOKEN)));
			// 	// var username = userInfo.userKeyInfo.id;
			// 	//console.log(username);
			// 	// var userId = username;
			// 	var userId = this.userInfo.account;
			// 	this.imageExtendParam.doflag = 'querymemo';
			// 	this.imageExtendParam.busitype = busiType;
			// 	this.imageExtendParam.itemid = itemid;
			// 	this.$store.dispatch('loading/CHANGE_LOADING', true)
			// 	// console.log("进入查看影像备注信息");
			// 	ImageExtendCheck(this.imageExtendParam, userId).then(res => {
			// 		this.$store.dispatch('loading/CHANGE_LOADING', false)
			// 		console.log(res.resBody);
			// 		if (res.resultCode == constant.SUCCESS && res.resBody) {
			// 			const memoListTableData_s = [];
			// 			for (var i = 0; i < res.resBody.length; i++) {
			// 				const obj = {
			// 					serialNumber: i + 1,
			// 					time: res.resBody[i].time,
			// 					remark: res.resBody[i].remark,
			// 					userid: res.resBody[i].userid,
			// 					busitype: res.busitype,
			// 					itemid: res.itemid,
			// 				}
			// 				memoListTableData_s.push(obj);
			// 			}
			// 			this.memoListTableData = memoListTableData_s;
			// 		}
			// 	}).catch(err => {
			// 		// console.log("搜索结果出来了，失败了么");
			// 		this.$store.dispatch('loading/CHANGE_LOADING', false);
			// 	})
			// },
			rowStyle({ row, rowIndex }) {
				if (row.clorFlag == '1') {
					return "color:blue !important";
				} else if (row.clorFlag == '2') {
					return "color:red !important";
				} else if (row.clorFlag == '3') {
					return "color:green !important";
				} else {
					return "";
				}
			},
			imagInfoGo(busiType,policyNo,busiNo,subbusitype,productType,docTyp,stockID,groupNo,scanDate,
				scanTime,isPrint,ishcprint,version,itemid,agentNo,updateflag,company) {
				this.imagInfoDialog = true;
				// this.purviewForm();
				this.imagInfoParams.busiType = busiType;
				this.imagInfoParams.policyNo = policyNo;
				this.imagInfoParams.busiNo = busiNo;
				this.imagInfoParams.subbusitype = subbusitype;
				this.imagInfoParams.docTyp = docTyp;
				this.imagInfoParams.stockID = stockID;
				this.imagInfoParams.groupNo = groupNo;
				this.imagInfoParams.scanDate = scanDate;
				this.imagInfoParams.scanTime = scanTime;
				this.imagInfoParams.isPrint = isPrint;
				this.imagInfoParams.ishcprint = ishcprint;
				this.imagInfoParams.version = version;
				this.imagInfoParams.itemid = itemid;
				this.imagInfoParams.agentNo = agentNo;
				this.imagInfoParams.updateflag = updateflag;
				this.imagInfoParams.company = company;
				this.imagInfoParams.productType = productType;
				// this.imagInfoParamshandle.busiType = busiType;
				// this.imagInfoParamshandle.policyNo = policyNo;
				// this.imagInfoParamshandle.busiNo = busiNo;
				// this.imagInfoParamshandle.subbusitype = subbusitype;
				// this.imagInfoParamshandle.docTyp = docTyp;
				// this.imagInfoParamshandle.stockID = stockID;
				// this.imagInfoParamshandle.groupNo = groupNo;
				// this.imagInfoParamshandle.scanDate = scanDate;
				// this.imagInfoParamshandle.scanTime = scanTime;
				// this.imagInfoParamshandle.isPrint = isPrint;
				// this.imagInfoParamshandle.ishcprint = ishcprint;
				// this.imagInfoParamshandle.version = version;
				// this.imagInfoParamshandle.itemid = itemid;
				// this.imagInfoParamshandle.agentNo = agentNo;
				// this.imagInfoParamshandle.updateflag = updateflag;
				// this.imagInfoParamshandle.company = company;

				// if (productType == null || productType == "null") {
				// 	this.imagInfoParams.productType = "";
				// 	this.imagInfoParamshandle.productType = "";
				// } else {
				// 	this.imagInfoParams.productType = productType;
				// 	this.imagInfoParamshandle.productType = productType;
				// }
			},
			// 上传文件列表取消事件
			uploadImgCancel() {
				this.uploadImgFlag = false;
				this.uploadImgDataForm = {};
			},
			// 删除文件上传列表数据
			deleteUpLoadRow(index,listData){
				let params = listData[index];
				params.lastUpdateId = this.userInfo.account;
				this.$confirm(`确定进行删除操作?`, "提示", {
					confirmButtonText: "确定",
					cancelButtonText: "取消",
					type: "warning",
				}).then(() => {
					this.show();
					deletePreUnderImageApi(params).then((res) => {
						if (res.resultCode === 0) {
							this.cancle();
							this.$message({message: res.resultMsg,type: "success",showClose: true});
							// 调用查询接口
							this.queryImage();
						}else{
							this.cancle();
							// this.$message({message: res.resultMsg,type: "warning",showClose: true});
						}
					}).catch((err) => {
						this.cancle();
						// this.$message({message: "删除文件列表发生异常",type: "warning",showClose: true});
					});
				});
			},
			inputSxallAmt(value){
				if(value != undefined && value != ''){
					this.sxallamt = parseFloat(value).toFixed(2);
				}else{
					return 0;
				}
			},
			inputZjallAmt(value){
				if(value != undefined && value != ''){
					this.zjallamt = parseFloat(value).toFixed(2);
				}else{
					return 0;
				}
			},
			getSummaries(param) {
                const { columns, data } = param;
                const sums = [];
                columns.forEach((column, index) => {
					// 合计显示
					if(index === 0){
						sums[index] = "合计";
						return ;
					}
					// 指定栏位计算
                    if (index == '5' || index == '8' || index == '9' || index == '10') {
                        const values = data.map(item => Number(item[column.property]));
                        if (!values.every(value => isNaN(value))) {
                            sums[index] = values.reduce((prev, curr) => {
								const value = Number(curr);
								if (!isNaN(value)) {
									return prev + curr;
								} else {
									return prev;
								}
                            }, 0);
                            sums[index] = parseFloat(sums[index].toFixed(2));
                        } else {
                            sums[index] = '';
                        }
                    }else{
                        sums[index] = '';
                    }
                });
                return sums;
            },
		},
		// 渲染加载数据
		activated() {
			this.userInfo = JSON.parse(localStorage.getItem(getToken('token'))).userKeyInfo;
			// 查询状态是否匹配
			let seqnum = this.$route.params.seqnum;
			let routeStatus = this.$route.params.routeStatus;
			queryPreUnderWritingStatusApi(seqnum,routeStatus).then((res) => {
				if (res.resultCode === 0) {
					// 加锁操作
					let rowData = [{
						seqnum : seqnum,
						lastUpdateId : this.userInfo.account,
						showPage : '2'
					}];
					queryLockStatusApi(rowData).then((res) => {
						// 如果是同个人或没有人时，则加锁并加载数据，否则不加载
						if (res.resultCode === 0) {
							// 如果等于false说明不加锁，直接查询
							if(res.data.addLock != undefined){
								if(res.data.addLock == 'false'){
									this.initData(seqnum,routeStatus);
									return ;
								}	
							}
							let rowDatas = [{
								seqnum : seqnum,
								checkoutusrid : this.userInfo.account
							}];
							// 调用加锁,加锁成功后跳转
							addLockApi(rowDatas).then((res) => {
								// 加锁异常不加载数据
								if (res.resultCode === 0) {
									// this.$store.dispatch("loading/CHANGE_LOADING", false);
									this.$message({message: res.resultMsg,type: "success",showClose: true});
									this.initData(seqnum,routeStatus);
								}else{
									this.changeDis = true;
									this.messageDis = true;
									this.enabledUploadBtn = false;
									this.cancle();
									// this.$store.dispatch("loading/CHANGE_LOADING", false);
									// this.$message({message: res.resultMsg,type: "warning",showClose: true});
								}
							}).catch((err) => {
								this.changeDis = true;
								this.messageDis = true;
								this.enabledUploadBtn = false;
								this.cancle();
								// this.$store.dispatch("loading/CHANGE_LOADING", false);
							});
						}else{
							this.changeDis = true;
							this.messageDis = true;
							this.enabledUploadBtn = false;
							this.cancle();
							// this.$store.dispatch("loading/CHANGE_LOADING", false);
						}
					}).catch((err) => {
						this.changeDis = true;
						this.messageDis = true;
						this.enabledUploadBtn = false;
						this.cancle();
						// this.$store.dispatch("loading/CHANGE_LOADING", false);
					});
				}else{
					// let tagActiveArr = JSON.parse(sessionStorage.getItem('tagActive'));
					// tagActiveArr.forEach((item,index)=>{
					// 	if(item.path.indexOf(this.seqNumber) != -1){
					// 		tagActiveArr.splice(index,1);
					// 	}
					// });
					// sessionStorage.setItem('tagActive',JSON.stringify(tagActiveArr));
					// if(this.$route.params.routeStatus == 'A'){
					// 	this.$router.push({ path: "/home/taskCenter/pre/directUnderwriteList"});
					// }else if(this.$route.params.routeStatus == 'C'){
					// 	this.$router.push({ path: "/home/taskCenter/pre/directUnderwriteQuery"});
					// }else if(this.$route.params.routeStatus == 'W'){
					// 	this.$router.push({ path: "/home/taskCenter/pre/directUnderwriteMess"});
					// }
					this.changeDis = true;
					this.messageDis = true;
					this.enabledUploadBtn = false;
					this.cancle();
					// this.$message({message: res.resultMsg,type: "warning",showClose: true});
				}
			}).catch((err) => {
				this.changeDis = true;
				this.messageDis = true;
				this.enabledUploadBtn = false;
				this.cancle();
				// this.$message({message: res.resultMsg ,type: "warning",showClose: true});
			});
		},
		watch: {
			
		}
	}
</script>

<style lang="less" scoped>
	.fillcontain {
		padding-bottom: 0;
	}

	.contain {
		background: #fff;
		padding: 10px;
	}

	.com-lab{
        padding: 0 4px;
        text-align:right;
        line-height: 30px;
    }

	.operationIconC {
		// padding: 12px;
		// border: 1px solid #e5e5e5;
		border-radius: 50%;
		align-items: center;
		width: 40px;
		text-align: center;
		height: 40px;
		display: grid;
		margin: 5px;
		cursor: pointer;
		box-shadow: 0 0 3px #f9f9f9;

		.el-icon-camera { //影像图标
			color: #409EFF;
			font-size: 24px;
		}

		.el-icon-tickets {
			font-size: 16px;
			color: #409EFF;
		}

		.el-icon-edit-outline {
			font-size: 16px;
			color: #409EFF;
		}
	}
	
	.suspend-nav {
		position: fixed;
		right: 10px;
		bottom: 100px;
		z-index: 10000;
		width: 72px;
		height: auto;
    	.row-item:hover {
			cursor: pointer;
			a:hover {
				font-weight: bold;
				color: #f76767;
				text-decoration: underline;
			}
    	}

		.row-item {
			&:last-child {
				border-right: none;
			}

			span {
				font-weight: bold;
				color: #f76767;
			}

			position: relative;
			border-right: 2px dashed #f76767;
			// padding-bottom: 48px;
			padding-bottom: 30px;
			.status-point {
				position: absolute;
				right: -5px;
				top: 0;
				display: inline-block;
				width: 10px;
				height: 10px;
				border-radius: 50%;
				background-color: #f76767;
			}
      		.status-poin :last-child {
        		display: none;
      		}
    	}
  	}

  	.suspend-nav-right {
    	right: 25px !important;
	}

	.suspend {
		position: fixed;
		top: 36.5%;
		right: 25px;
		z-index: 1000;
		.img-con {
			width: 50px;
			height: 50px;
			background: rgba(0, 0, 0, 0.4);
			text-align: center;
			align-items: center;
    		display: grid;
			line-height: 36px;
			border-radius: 4px;
			cursor: pointer;

			img {
				vertical-align: middle;
				// width: 16px;
				width: 24px;
			}
		}
	}
</style>
